3.431 \(\int \frac{(a+b \log (c x^n))^2}{x (d+e x^r)^2} \, dx\)

Optimal. Leaf size=182 \[ \frac{2 b n \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{2 b^2 n^2 \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b^2 n^2 \text{PolyLog}\left (3,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b n \log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{\log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d^2 r}+\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )} \]

[Out]

(a + b*Log[c*x^n])^2/(d*r*(d + e*x^r)) + (2*b*n*(a + b*Log[c*x^n])*Log[1 + d/(e*x^r)])/(d^2*r^2) - ((a + b*Log
[c*x^n])^2*Log[1 + d/(e*x^r)])/(d^2*r) - (2*b^2*n^2*PolyLog[2, -(d/(e*x^r))])/(d^2*r^3) + (2*b*n*(a + b*Log[c*
x^n])*PolyLog[2, -(d/(e*x^r))])/(d^2*r^2) + (2*b^2*n^2*PolyLog[3, -(d/(e*x^r))])/(d^2*r^3)

________________________________________________________________________________________

Rubi [A]  time = 0.426535, antiderivative size = 182, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {2349, 2345, 2374, 6589, 2338, 2391} \[ \frac{2 b n \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{2 b^2 n^2 \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b^2 n^2 \text{PolyLog}\left (3,-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b n \log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d^2 r^2}-\frac{\log \left (\frac{d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d^2 r}+\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/(x*(d + e*x^r)^2),x]

[Out]

(a + b*Log[c*x^n])^2/(d*r*(d + e*x^r)) + (2*b*n*(a + b*Log[c*x^n])*Log[1 + d/(e*x^r)])/(d^2*r^2) - ((a + b*Log
[c*x^n])^2*Log[1 + d/(e*x^r)])/(d^2*r) - (2*b^2*n^2*PolyLog[2, -(d/(e*x^r))])/(d^2*r^3) + (2*b*n*(a + b*Log[c*
x^n])*PolyLog[2, -(d/(e*x^r))])/(d^2*r^2) + (2*b^2*n^2*PolyLog[3, -(d/(e*x^r))])/(d^2*r^3)

Rule 2349

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_))/(x_), x_Symbol] :> Dist[1/d,
Int[((d + e*x^r)^(q + 1)*(a + b*Log[c*x^n])^p)/x, x], x] - Dist[e/d, Int[x^(r - 1)*(d + e*x^r)^q*(a + b*Log[c*
x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0] && ILtQ[q, -1]

Rule 2345

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> -Simp[(Log[1 +
d/(e*x^r)]*(a + b*Log[c*x^n])^p)/(d*r), x] + Dist[(b*n*p)/(d*r), Int[(Log[1 + d/(e*x^r)]*(a + b*Log[c*x^n])^(p
 - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :
> Simp[(f^m*(d + e*x^r)^(q + 1)*(a + b*Log[c*x^n])^p)/(e*r*(q + 1)), x] - Dist[(b*f^m*n*p)/(e*r*(q + 1)), Int[
((d + e*x^r)^(q + 1)*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[
m, r - 1] && IGtQ[p, 0] && (IntegerQ[m] || GtQ[f, 0]) && NeQ[r, n] && NeQ[q, -1]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )^2} \, dx &=\frac{\int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx}{d}-\frac{e \int \frac{x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^r\right )^2} \, dx}{d}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r}+\frac{(2 b n) \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x^{-r}}{e}\right )}{x} \, dx}{d^2 r}-\frac{(2 b n) \int \frac{a+b \log \left (c x^n\right )}{x \left (d+e x^r\right )} \, dx}{d r}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^2}-\frac{\left (2 b^2 n^2\right ) \int \frac{\log \left (1+\frac{d x^{-r}}{e}\right )}{x} \, dx}{d^2 r^2}-\frac{\left (2 b^2 n^2\right ) \int \frac{\text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{x} \, dx}{d^2 r^2}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d r \left (d+e x^r\right )}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac{d x^{-r}}{e}\right )}{d^2 r}-\frac{2 b^2 n^2 \text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^3}+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^2}+\frac{2 b^2 n^2 \text{Li}_3\left (-\frac{d x^{-r}}{e}\right )}{d^2 r^3}\\ \end{align*}

Mathematica [B]  time = 0.461516, size = 397, normalized size = 2.18 \[ \frac{2 a b n r \left (\text{PolyLog}\left (2,\frac{e x^r}{d}+1\right )+\left (\log \left (-\frac{e x^r}{d}\right )-r \log (x)\right ) \log \left (d+e x^r\right )+\frac{1}{2} r^2 \log ^2(x)\right )+2 b^2 n r \left (\log \left (c x^n\right )-n \log (x)\right ) \left (\text{PolyLog}\left (2,\frac{e x^r}{d}+1\right )+\left (\log \left (-\frac{e x^r}{d}\right )-r \log (x)\right ) \log \left (d+e x^r\right )+\frac{1}{2} r^2 \log ^2(x)\right )-2 b^2 n^2 \left (\text{PolyLog}\left (2,\frac{e x^r}{d}+1\right )+\left (\log \left (-\frac{e x^r}{d}\right )-r \log (x)\right ) \log \left (d+e x^r\right )+\frac{1}{2} r^2 \log ^2(x)\right )-b^2 n^2 \left (-2 \text{PolyLog}\left (3,-\frac{d x^{-r}}{e}\right )-2 r \log (x) \text{PolyLog}\left (2,-\frac{d x^{-r}}{e}\right )+r^2 \log ^2(x) \log \left (\frac{d x^{-r}}{e}+1\right )\right )-a^2 r^2 \log \left (d-d x^r\right )+\frac{d r^2 \left (a+b \log \left (c x^n\right )\right )^2}{d+e x^r}+2 a b r^2 \left (n \log (x)-\log \left (c x^n\right )\right ) \log \left (d-d x^r\right )+2 a b n r \log \left (d-d x^r\right )+b^2 \left (-r^2\right ) \left (\log \left (c x^n\right )-n \log (x)\right )^2 \log \left (d-d x^r\right )+2 b^2 n r \left (\log \left (c x^n\right )-n \log (x)\right ) \log \left (d-d x^r\right )}{d^2 r^3} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*Log[c*x^n])^2/(x*(d + e*x^r)^2),x]

[Out]

((d*r^2*(a + b*Log[c*x^n])^2)/(d + e*x^r) + 2*a*b*n*r*Log[d - d*x^r] - a^2*r^2*Log[d - d*x^r] + 2*a*b*r^2*(n*L
og[x] - Log[c*x^n])*Log[d - d*x^r] + 2*b^2*n*r*(-(n*Log[x]) + Log[c*x^n])*Log[d - d*x^r] - b^2*r^2*(-(n*Log[x]
) + Log[c*x^n])^2*Log[d - d*x^r] - 2*b^2*n^2*((r^2*Log[x]^2)/2 + (-(r*Log[x]) + Log[-((e*x^r)/d)])*Log[d + e*x
^r] + PolyLog[2, 1 + (e*x^r)/d]) + 2*a*b*n*r*((r^2*Log[x]^2)/2 + (-(r*Log[x]) + Log[-((e*x^r)/d)])*Log[d + e*x
^r] + PolyLog[2, 1 + (e*x^r)/d]) + 2*b^2*n*r*(-(n*Log[x]) + Log[c*x^n])*((r^2*Log[x]^2)/2 + (-(r*Log[x]) + Log
[-((e*x^r)/d)])*Log[d + e*x^r] + PolyLog[2, 1 + (e*x^r)/d]) - b^2*n^2*(r^2*Log[x]^2*Log[1 + d/(e*x^r)] - 2*r*L
og[x]*PolyLog[2, -(d/(e*x^r))] - 2*PolyLog[3, -(d/(e*x^r))]))/(d^2*r^3)

________________________________________________________________________________________

Maple [F]  time = 0.851, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{2}}{x \left ( d+e{x}^{r} \right ) ^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2/x/(d+e*x^r)^2,x)

[Out]

int((a+b*ln(c*x^n))^2/x/(d+e*x^r)^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a^{2}{\left (\frac{1}{d e r x^{r} + d^{2} r} + \frac{\log \left (x\right )}{d^{2}} - \frac{\log \left (\frac{e x^{r} + d}{e}\right )}{d^{2} r}\right )} + \int \frac{b^{2} \log \left (c\right )^{2} + b^{2} \log \left (x^{n}\right )^{2} + 2 \, a b \log \left (c\right ) + 2 \,{\left (b^{2} \log \left (c\right ) + a b\right )} \log \left (x^{n}\right )}{e^{2} x x^{2 \, r} + 2 \, d e x x^{r} + d^{2} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x/(d+e*x^r)^2,x, algorithm="maxima")

[Out]

a^2*(1/(d*e*r*x^r + d^2*r) + log(x)/d^2 - log((e*x^r + d)/e)/(d^2*r)) + integrate((b^2*log(c)^2 + b^2*log(x^n)
^2 + 2*a*b*log(c) + 2*(b^2*log(c) + a*b)*log(x^n))/(e^2*x*x^(2*r) + 2*d*e*x*x^r + d^2*x), x)

________________________________________________________________________________________

Fricas [C]  time = 1.45819, size = 1382, normalized size = 7.59 \begin{align*} \frac{b^{2} d n^{2} r^{3} \log \left (x\right )^{3} + 3 \, b^{2} d r^{2} \log \left (c\right )^{2} + 6 \, a b d r^{2} \log \left (c\right ) + 3 \, a^{2} d r^{2} + 3 \,{\left (b^{2} d n r^{3} \log \left (c\right ) + a b d n r^{3}\right )} \log \left (x\right )^{2} +{\left (b^{2} e n^{2} r^{3} \log \left (x\right )^{3} + 3 \,{\left (b^{2} e n r^{3} \log \left (c\right ) - b^{2} e n^{2} r^{2} + a b e n r^{3}\right )} \log \left (x\right )^{2} + 3 \,{\left (b^{2} e r^{3} \log \left (c\right )^{2} - 2 \, a b e n r^{2} + a^{2} e r^{3} - 2 \,{\left (b^{2} e n r^{2} - a b e r^{3}\right )} \log \left (c\right )\right )} \log \left (x\right )\right )} x^{r} - 6 \,{\left (b^{2} d n^{2} r \log \left (x\right ) + b^{2} d n r \log \left (c\right ) - b^{2} d n^{2} + a b d n r +{\left (b^{2} e n^{2} r \log \left (x\right ) + b^{2} e n r \log \left (c\right ) - b^{2} e n^{2} + a b e n r\right )} x^{r}\right )}{\rm Li}_2\left (-\frac{e x^{r} + d}{d} + 1\right ) - 3 \,{\left (b^{2} d r^{2} \log \left (c\right )^{2} - 2 \, a b d n r + a^{2} d r^{2} +{\left (b^{2} e r^{2} \log \left (c\right )^{2} - 2 \, a b e n r + a^{2} e r^{2} - 2 \,{\left (b^{2} e n r - a b e r^{2}\right )} \log \left (c\right )\right )} x^{r} - 2 \,{\left (b^{2} d n r - a b d r^{2}\right )} \log \left (c\right )\right )} \log \left (e x^{r} + d\right ) + 3 \,{\left (b^{2} d r^{3} \log \left (c\right )^{2} + 2 \, a b d r^{3} \log \left (c\right ) + a^{2} d r^{3}\right )} \log \left (x\right ) - 3 \,{\left (b^{2} d n^{2} r^{2} \log \left (x\right )^{2} +{\left (b^{2} e n^{2} r^{2} \log \left (x\right )^{2} + 2 \,{\left (b^{2} e n r^{2} \log \left (c\right ) - b^{2} e n^{2} r + a b e n r^{2}\right )} \log \left (x\right )\right )} x^{r} + 2 \,{\left (b^{2} d n r^{2} \log \left (c\right ) - b^{2} d n^{2} r + a b d n r^{2}\right )} \log \left (x\right )\right )} \log \left (\frac{e x^{r} + d}{d}\right ) + 6 \,{\left (b^{2} e n^{2} x^{r} + b^{2} d n^{2}\right )}{\rm polylog}\left (3, -\frac{e x^{r}}{d}\right )}{3 \,{\left (d^{2} e r^{3} x^{r} + d^{3} r^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x/(d+e*x^r)^2,x, algorithm="fricas")

[Out]

1/3*(b^2*d*n^2*r^3*log(x)^3 + 3*b^2*d*r^2*log(c)^2 + 6*a*b*d*r^2*log(c) + 3*a^2*d*r^2 + 3*(b^2*d*n*r^3*log(c)
+ a*b*d*n*r^3)*log(x)^2 + (b^2*e*n^2*r^3*log(x)^3 + 3*(b^2*e*n*r^3*log(c) - b^2*e*n^2*r^2 + a*b*e*n*r^3)*log(x
)^2 + 3*(b^2*e*r^3*log(c)^2 - 2*a*b*e*n*r^2 + a^2*e*r^3 - 2*(b^2*e*n*r^2 - a*b*e*r^3)*log(c))*log(x))*x^r - 6*
(b^2*d*n^2*r*log(x) + b^2*d*n*r*log(c) - b^2*d*n^2 + a*b*d*n*r + (b^2*e*n^2*r*log(x) + b^2*e*n*r*log(c) - b^2*
e*n^2 + a*b*e*n*r)*x^r)*dilog(-(e*x^r + d)/d + 1) - 3*(b^2*d*r^2*log(c)^2 - 2*a*b*d*n*r + a^2*d*r^2 + (b^2*e*r
^2*log(c)^2 - 2*a*b*e*n*r + a^2*e*r^2 - 2*(b^2*e*n*r - a*b*e*r^2)*log(c))*x^r - 2*(b^2*d*n*r - a*b*d*r^2)*log(
c))*log(e*x^r + d) + 3*(b^2*d*r^3*log(c)^2 + 2*a*b*d*r^3*log(c) + a^2*d*r^3)*log(x) - 3*(b^2*d*n^2*r^2*log(x)^
2 + (b^2*e*n^2*r^2*log(x)^2 + 2*(b^2*e*n*r^2*log(c) - b^2*e*n^2*r + a*b*e*n*r^2)*log(x))*x^r + 2*(b^2*d*n*r^2*
log(c) - b^2*d*n^2*r + a*b*d*n*r^2)*log(x))*log((e*x^r + d)/d) + 6*(b^2*e*n^2*x^r + b^2*d*n^2)*polylog(3, -e*x
^r/d))/(d^2*e*r^3*x^r + d^3*r^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/x/(d+e*x**r)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x^{r} + d\right )}^{2} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x/(d+e*x^r)^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2/((e*x^r + d)^2*x), x)